package com.aikg.kgrag_java.pojo.request;

import com.aikg.kgrag_java.pojo.entity.RoleContentPair;
import com.aikg.kgrag_java.pojo.enums.RoleEnum;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: LLMRequestBody
 * @Description: 大模型问答对拼装类
 * @Author: 李宗雨
 * @Date: 2024/12/30 13:52
 * @Version: 1.0
 **/
public class LLMRequestBody {

    List<RoleContentPair> messages = new ArrayList<>();


    public void addMessages(RoleContentPair roleContentPair){
        this.messages.add(roleContentPair);
    }


    public void addMessages(RoleEnum roleEnum, String content){
        addMessages(new RoleContentPair(roleEnum.getRoleName(), content));
    }

    public List<RoleContentPair> getMessages() {
        return messages;
    }
}
